package com.zack.designPattern.proxy.dynamicproxy;

import java.lang.reflect.Proxy;

public class Demo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Speaker speaker =(Speaker)Proxy.newProxyInstance(HelloSpeaker.class.getClassLoader(), HelloSpeaker.class.getInterfaces(), new SpeakerInvocationHandler(new HelloSpeaker("zack")));
		speaker.say("aaa");
	}

}
